registerTests([
function GroupBy_Test_0()
{
	var myArray = [{x:1, y:3}, {x:2, y:3}, {x:3, y:42}, {x:99, y:42}];
	var result = myArray.GroupBy("o=>o.y");
	Assert.areEqual(result.length, 2, "Grouped Set.Length: Expected 2 but got " + result.length);
	var firstSet = result[0];
	Assert.areEqual(firstSet.length, 2, "First Set.Length: Expected 2 but got " + firstSet.length);
	var secondSet = result[1];
	Assert.areEqual(secondSet.length, 2, "Second Set.Length: Expected 2 but got " + secondSet.length);
	Assert.isTrue(firstSet[0].x == 1 && firstSet[0].y == 3, "First Set[0]: Expected {x: 1, y: 3} but got " + firstSet[0]);
	Assert.isTrue(firstSet[1].x == 2 && firstSet[1].y == 3, "First Set[1]: Expected {x: 2, y: 3} but got " + firstSet[1]);
	Assert.isTrue(secondSet[0].x == 3 && secondSet[0].y == 42, "Second Set[0]: Expected {x: 3, y: 42} but got " + secondSet[0]);
	Assert.isTrue(secondSet[1].x == 99 && secondSet[1].y == 42, "Second Set[1]: Expected {x: 99, y: 42} but got " + secondSet[1]);
},
]);